<include file="Layout/header" />
      
<include file="Layout/aside" />

      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            信息输出表
            <small>preview of simple tables</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#">学生信息</a></li>
            <li class="active">列表</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">
            <div class="col-md-12">
              <div class="box">
                <div class="box-header with-border">
                  <h3 class="box-title"><i class="fa fa-th"></i> 学生信息管理</h3>
                </div><!-- /.box-header -->
                <div class="row">
                  <form action="" method="get">
                    <div class="col-md-3">
                       <input type="text" name="title" value="<?php echo $_GET['title'];?>" class="form-control" id="inputPassword3" placeholder="请输入标题">
                       <input type="text" name="aid" value="<?php echo $_GET['thumb'];?>" class="form-control" id="inputPassword3" placeholder="url">
                    </div>
                    <div class="col-md-9">
                        <button type="submit" class="btn btn-primary">搜索</button>
                    </div>
                  </form>
                </div>
                <div class="box-body">
                  <table class="table table-bordered">
                    <tr>
                      <th style="width:60px">编号</th>
                      <th>类别</th>
                      <th>缩略图</th>
                      <th>栏目名</th>
                      <th style="width: 100px">操作</th>
                    </tr>
                    <foreach name="res" item="vo" >
                      <tr>
                        <td>{++$key}</td>
                        <td>{$vo['title']}</td>
                        <td>{$vo.photo}</td>
                        <td>{$vo.name}</td>
                        <td>
                        <!-- <a   class="btn btn-xs btn-danger" href="{:U('Index/del',array('id'=>$vo['id']))}">删除</a> -->
                        <button   class="btn btn-xs btn-danger" onclick=doDel({$vo['id']},this)>删除</button>
                        <a   class="btn btn-xs btn-primary" href="{:U('Index/edit',array('id'=>$vo['id']))}">编辑</a>
                      </tr>
                    </foreach>
                   
                  </table>
                </div><!-- /.box-body -->
                <div class="box-footer clearfix">
                  <ul class="pagination pagination-sm no-margin pull-right">
                    <!-- <li><a href="#">&laquo;</a></li> -->
                    <!-- <li><a href="#">{$page}</a></li> -->
                    <!-- <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li> -->
                    <!-- <li><a href="#">&raquo;</a></li> -->
                    {$page}
                  </ul>
                </div>
              </div><!-- /.box -->

              
              
            </div><!-- /.col -->
            
          </div><!-- /.row -->
         
        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
      <script>  
          function doDel(id,ob){
              $.post("{:U('Index/del')}",{id:id},function(data){
                if(data.error == "1"){
                  $(ob).parents("tr").remove();
                }else{
                  alert("删除失败");
                }
              });
          }
      </script>
<include file="Layout/footer" />